home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / filesyst / ncpfs / ipxripd-.000 / ipxripd- / ipxripd / ipxd.h < prev    next >
C/C++ Source or Header  |  1996-02-08  |  2KB  |  84 lines

  1. /*
  2.     IPX routing daemon
  3.  
  4.     Copyright (C) 1996, Volker Lendecke <lendecke@namu01.gwdg.de>
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. */
  21.  
  22. #ifndef _IPXD_H_
  23. #define _IPXD_H_
  24.  
  25. #include <stdio.h>
  26. #include <sys/time.h>
  27. #include "ipxutil.h"
  28. #include "ipxkern.h"
  29. #include "ipxsap.h"
  30. #include "ipxrip.h"
  31.  
  32. #define TICKS_FILE ("/etc/ipx_ticks")
  33. #define DEFAULT_TICKS (1)
  34.  
  35. #define TIMER_RATE    (30)
  36. #define EXPIRE_TIME    (180)
  37. #define BROADCAST_TIME    (60)
  38.  
  39. #define MAX_IFACE    (32)
  40.  
  41. struct ipx_interface
  42. {
  43.     IPXNode ifnode;
  44.     int ticks;        /* How many ticks does it cost to send
  45.                    over this interface? */
  46.     int valid;
  47.     int visited;
  48.     
  49.     struct sap_output s_output;
  50.     struct rip_output r_output;
  51. };
  52.  
  53. extern int new_log_entry;
  54. extern int debug_option;
  55. extern FILE *log_file;
  56. extern int passive;
  57.  
  58. extern int check_request;
  59.  
  60. struct ipx_interface *first_interface(void);
  61. struct ipx_interface *next_interface(struct ipx_interface *ifc);
  62. int ifc_get_index(struct ipx_interface *ifc);
  63. int first_ifc_index(void);
  64. int next_ifc_index(int i);
  65. int find_ticks(char *device);
  66.  
  67. static inline void
  68. print_time()
  69. {
  70.     time_t t;
  71.     time(&t);
  72.     fprintf(log_file,"\n%s",ctime(&t));
  73. }
  74.  
  75. #define LOG_ENTRY    {new_log_entry=1;}
  76. #define LOG_START    {if (new_log_entry) {print_time(); new_log_entry=0;}
  77. #define LOG_END        fflush(log_file);}
  78. #define DL_ENTRY    {if (debug_option) LOG_ENTRY}
  79. #define DL_START    {if (debug_option) LOG_START
  80. #define DL_END        LOG_END }
  81. #define DEFAULT_LOGNAME "/dev/null"
  82.  
  83. #endif /* _IPXD_H_ */
  84.